package eu.winterwheels.enterprise.service.iso;

import java.util.logging.Logger;

import javax.ejb.Stateful;
import javax.inject.Inject;

import eu.winterwheels.enterprise.data.CountryData;
import eu.winterwheels.enterprise.model.Country;

// The @Stateless annotation eliminates the need for manual transaction demarcation
@Stateful
public class CountryService {
	
	// TODO do not place any fields in this class! retrieve all data from CountryData
		// OR
		// integrate the data composition layer within the EJB layer.

	@Inject
	private Logger log;

	@Inject
	private CountryData countryData;
	
	public Country getCountryByCode(String iso2digitCountryCode) {		
		return countryData.getCountryByCode(iso2digitCountryCode);
	}
	 
}
